<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
    <meta name="wechat-enable-text-zoom-em" content="true">
    <title>登 录</title>
    <link rel="stylesheet" href="css/weui1.min.css">
    <link rel="stylesheet" href="css/example.css">

    <style>
        label,label span,h2,.weui-agree.weui-wa-hotarea,input{
            color: #888 !important;
        }
        input::placeholder{
            color: #666;
        }
        input{
             color: #888 !important;
        }
        .weui-cell.weui-cell_active{
            border-top: 1px solid rgba(0,0,0,.1) !important;
        }
        .weui-cell__bd.weui-flex{
            padding: 0px !important;
        }
        .weui-form{
            background: #fff;
        }
        .weui-cell.weui-cell_active.weui-cell_vcode.weui-cell_wrap.p{
            border-bottom: 1px solid rgba(0,0,0,.1) !important;
        }

        .weui-cells{
            padding-left: 10px;
padding-right: 10px;

        }
    </style>


<style>
    .pro_type_grid .pro_item{
        width: calc(50% - .21rem * 2);
    }
    .header-search-txt{
        padding-left: 24px;
padding-right: 10px;
        width: 100%;
        background: #dddcdc;
       /* margin-left: 10px;
        margin-right: 10px;*/
        height: 25px;
        border-radius: 50px;
    }
    .page-header-background.header-title{
        text-align: center;
        color: #fff;
        font-size: 14px;
        font-weight: bold;
        line-height: 44px;
    }
    .pro_item .cover .photo{
        height:30px !important
    }
    .pro_item .cover{
        text-align: center;
    }
    .pro_item .item_inner{
        display: grid;
        grid-template-rows: auto auto;
        margin-bottom: 5px;
        background: #fff;
        padding-top: 15px;
        padding-bottom: 15px;
        height: 55px;
    }
    .pro_item div{
        text-align: center;
        font-size: 13px;
    }
    body{
        background: #eee;
        height: 100%;
    }
    .pro_item{
        display: grid;
grid-template-columns: auto auto;
grid-column-gap: 5px;
    }
    .page-header-background.header-title{
        background: #40af41;
    }
    .p1{
        padding-left: 10px;
padding-right: 10px;
padding-bottom: 10px;
background: #fff;
padding-top: 6px;
margin-top: -6px;
    }
    .p2{
        margin-left: 10px;
margin-right: 10px;
font-size: 10px;
text-align: center;
margin-bottom: 10px;

    }
    .c1{
        color: #888;
    }
    .d3{
        margin-bottom: 10px;
margin-top: 10px;
    }
    .d4{
        text-align: center;
        margin-bottom: 30px;
        position: fixed;
bottom: 10px;
width: 100%;
    }
    .but-lx{
    border: none;
width: 70%;
background: #f08818;
color: #fff;
line-height: 30px;
  border-radius: 50px;
}
.swiper-pagination-bullet.swiper-pagination-bullet-active{
    background: #40af41 !important;
}
.swiper-pagination-bullet{
    width: 5px !important;
height: 5px !important;
border-radius: 50px !important;
background: #888 !important;
}
.pp1{
    text-align: center;
color: #fff;
background: #40af41;
line-height: 44px;
font-size: 14px;
}
.pp2 img{
 width: 30px;
 height: 30px;
 margin-top: 10px;
}
.pp2{
    width: 50px;
    height: 50px;
    border-radius: 50px;
    background: #cecbcb;
    text-align: center;
}
.pp3{
    display: grid;
grid-template-columns: auto 50px auto;
padding-top: 30px;
padding-bottom: 34px;
background: #fff;
}
.text{
    padding-top: 15px;
}
body{
    background: #cecece;
}
.ppi5 img{
    height: 20px;
    width: auto;
margin-top: 10px;
}
.ppi5 a{
    display: grid;
grid-template-columns: auto 15px;
line-height: 40px;
background: #fff;
margin-right: 10px;
margin-left: 10px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-color: #cecece;
}
.ppi5{
margin-top: 10px;
background: #fff;
margin-bottom: 10px;
}
.active .fb-user {
  background-position: -3.6rem 0 !important;
}
.fb.fb-user{
    background-image: url(../images/user1.png) !important;
    background-position: 0 0 !important;
}
.fb.fb-home{
    background-image: url(../images/home1.png) !important;
    background-position: 0 0 !important;
}
.nav-controller{
    color:#40af41 !important
}
.nav-controller.active{
    color:#888 !important
}
.pt-title{
    text-align: center;
    font-size: 14px;
    font-weight: bold;
}
.ps1{
    font-weight: bold;
}
.ps2{
    padding:15px;
}
.ftitle{
    font-weight: bold;
    font-size: 12px;
}
.pt-content{
    font-size: 12px;
}
.page-header-background.header-title{
    position: fixed;
top: 0px;
width: 100%;
z-index: 999;
}
.ps2{
    margin-top: 44px;
}

.weui-form__bd{
    margin-top: 40px;
}

.weui-agree.weui-wa-hotarea{
    margin-bottom: 10px;
}
</style>


<script  src="js/_config.json"></script>


</head>
<body ontouchstart>
    <script type="text/javascript">window.__wxWebEnv&&(document.body.style.webkitTextSizeAdjust=JSON.parse(window.__wxWebEnv.getEnv()).fontScale+"%")</script>
    <span aria-hidden="true" id="js_a11y_comma" class="weui-hidden_abs">，</span>
    <div role="alert" class="weui-toptips weui-toptips_warn js_tooltips">错误提示</div>
    <div class="container" id="container"></div>
    <script type="text/html" id="tpl_home">
      
    <div class="page">


        <div class="page-header-background header-title">
            <a href="javascript:;" onclick="window.location.href=history.back(-1)"><div style="position: absolute;padding-top: 5px;padding-left: 5px;"><img style="height: 20px;" src="images/return.png"></div></a>
            <div>拼宠宠</div>
        </div>


  <div class="weui-form">
    <div class="weui-form__bd">
      <div class="weui-form__text-area">
        <h2 class="weui-form__title">登 录</h2>
       
      </div>
      <div class="weui-form__control-area">
        <div class="weui-cells__group weui-cells__group_form">
            <div class="weui-cells">
              
                <div id="js_cell_vcode" class="weui-cell weui-cell_active weui-cell_vcode weui-cell_wrap">
                    <div class="weui-cell__hd"><label for="js_input1" class="weui-label">账号</label></div>
                    <div class="weui-cell__bd weui-flex">
                        <input id="js_input1" class="weui-input weui-cell__control weui-cell__control_flex" type="text"  id="js_input" placeholder="输入账号" />
                       
                    </div>
                </div>
                <div id="js_cell_vcode" class="weui-cell weui-cell_active weui-cell_vcode weui-cell_wrap p">
                    <div class="weui-cell__hd"><label for="js_input2" class="weui-label">密码</label></div>
                    <div class="weui-cell__bd weui-flex">
                        <input id="js_input2" class="weui-input weui-cell__control weui-cell__control_flex" type="password"  id="js_input"  placeholder="输入密码" />
                       
                    </div>
                </div>
            </div>
          
        </div>





      </div>
    </div>
    <!-- <div style="display: none;" class="weui-form__ft">
      <div class="weui-form__tips-area">
        <label id="weuiAgree" for="weuiAgreeCheckbox" class="weui-agree weui-wa-hotarea">
          <input id="weuiAgreeCheckbox" type="checkbox" class="weui-agree__checkbox"/><span class="weui-agree__text">阅读并同意<a href="xy.html" >《相关条款》</a>
          </span>
        </label>
      </div>
      <div class="weui-form__opr-area">
        <button class="weui-btn weui-btn_primary" type="button" id="showTooltips">确定</button>
      </div>
    </div> -->
    <div class="weui-form__ft">
      <div class="weui-form__tips-area">
        <div class="weui-form__tips__group weui-form__tips__group_primary">
          <div class="weui-form__tips__wrp">
            <label id="weuiAgree1" for="weuiAgreeCheckbox1" class="weui-agree weui-wa-hotarea">
              <input id="weuiAgreeCheckbox1" type="checkbox" class="weui-agree__checkbox"/><span class="weui-agree__text">阅读并同意<a href="xy.html" >《相关条款》</a>
              </span>
            </label>
          </div>
      <!--    <div class="weui-form__tips__wrp">
            <label id="weuiAgree0" for="weuiAgreeCheckbox0" class="weui-agree weui-wa-hotarea">
              <input id="weuiAgreeCheckbox0" type="checkbox" class="weui-agree__checkbox"/><span class="weui-agree__text">以上信息用于核对账号绑定的身份</span>
            </label>
          </div>  -->

        </div>
      </div>
      <div class="weui-form__opr-area">
        <button class="weui-btn weui-btn_primary" type="button" role="button" id="showTooltips">登录</button>
      </div>
    </div>
  </div>
  <div role="alert" id="js_toast" style="display: none;">
      <div class="weui-mask_transparent"></div>
      <div class="weui-toast">
          <i class="weui-icon-success-no-circle weui-icon_toast"></i>
          <p class="weui-toast__content">已完成</p>
      </div>
  </div>
    <div role="alert" id="warnToast" style="display: none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast__wrp">
            <div class="weui-toast">
                <i class="weui-icon-warn weui-icon_toast"></i>
                <p class="weui-toast__content">未同意《相关条款》</p>
            </div>
        </div>
    </div>
    <div role="alert" id="getu" style="display: none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast__wrp">
            <div class="weui-toast">
                <i class="weui-icon-warn weui-icon_toast"></i>
                <p class="weui-toast__content">账号不能为空</p>
            </div>
        </div>
    </div>
    <div role="alert" id="getp" style="display: none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast__wrp">
            <div class="weui-toast">
                <i class="weui-icon-warn weui-icon_toast"></i>
                <p class="weui-toast__content">密码不能为空</p>
            </div>
        </div>
    </div>
    <div role="alert" id="status" style="display: none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast__wrp">
            <div class="weui-toast">
                <i class="weui-icon-warn weui-icon_toast"></i>
                <p class="weui-toast__content">登录失败</p>
            </div>
        </div>
    </div>


  <div role="alert" id="js_agree_msg" class="weui-hidden_abs" style="display: none;">未同意《相关条款》</div>
  <div id="dialogs">
      <!--BEGIN dialog1-->
      <div role="dialog" aria-modal="true" class="js_dialog" id="iosDialog1" style="display: none;">
          <div class="weui-mask"></div>
          <div id="js_half_screen_dialog" class="weui-half-screen-dialog">
              <div class="weui-half-screen-dialog__hd">
                <div class="weui-half-screen-dialog__hd__side">
                    <button id="dialogClose" class="weui-icon-btn">关闭<i class="weui-icon-close-thin"></i></button>
                </div>
                <div class="weui-half-screen-dialog__hd__main">
                  <strong class="weui-half-screen-dialog__title">标题</strong>
                </div>
              </div>
              <div class="weui-half-screen-dialog__bd">
                <br>
                <br>
                可放自定义内容
                <br>
                <br>
                <br>
                <br>
              </div>
          </div>
      </div>
      <!--END dialog1-->





  </div>



</div>




<script type="text/javascript">


    


    $(function(){


    var $warnToast =$("#warnToast");
      var $tooltips = $('.js_tooltips');
      var $toast = $('#js_toast');
      var $input = $('#js_input1');
      var $inputClear = $('#js_input_clear');
      var $agree= $('#weuiAgree');
      var $agreeMsg= $('#js_agree_msg');
      var $agreeCheckbox = $('#weuiAgreeCheckbox');
      var $iosDialog1 = $('#iosDialog1');
      var $halfScreenDialog = $('#js_half_screen_dialog');

      $input.on('input', function(){
        var $value = $input.val();
        if ($value){
          $('#showTooltips').removeAttr('disabled');
          $('#showTooltips').attr('aria-disabled','false');
        }else{
          $('#showTooltips').addAttr('disabled');
          $('#showTooltips').attr('aria-disabled','true');
        }
      });

      //$agreeCheckbox.on('change', function(){
      //});

      $('#showTooltips').on('click', function(){

        var username=document.getElementById("js_input1").value;
        var password=document.getElementById("js_input2").value;
        if (username=="") {
            document.getElementById("getu").style.display="block";
            // $warnToast.fadeIn(100);
            setTimeout(function () {
                document.getElementById("getu").style.display="none";

            }, 800);
            return;
        }

        if (password=="") {
            document.getElementById("getp").style.display="block";
            // $warnToast.fadeIn(100);
            setTimeout(function () {
                document.getElementById("getp").style.display="none";

            }, 800);
            return;
        }

        var weuiAgreeCheckbox1=document.getElementById("weuiAgreeCheckbox1").checked;
        if (weuiAgreeCheckbox1==false) {
            document.getElementById("warnToast").style.display="block";
            // $warnToast.fadeIn(100);
            setTimeout(function () {
                document.getElementById("warnToast").style.display="none";

            }, 800);
            return;
        }

        let url=siteConfig.BaseUrl+"/h5/api/?url=login";
        $.post(url,{
            username:username,
            password:password
        },function(res){
            if (res.code==200) {
                localStorage.setItem('__token__', res.data.token );
                window.location.href="user.html";
            }else{
                
                document.getElementById("status").style.display="block";
                // $warnToast.fadeIn(100);
                setTimeout(function () {
                    document.getElementById("status").style.display="none";
                }, 800);
                return;
            }
            
        });


        if ($tooltips.css('display') != 'none') return;
        // toptips的fixed, 如果有`animation`, `position: fixed`不生效
        $('.page.cell').removeClass('slideIn');

        if($agreeCheckbox.prop("checked")){
          $agree.removeClass('weui-agree_warn');
          $toast.fadeIn(100);
          $toast.attr('aria-live','assertive');
          setTimeout(function () {
            $toast.fadeOut(100);
            $toast.attr('aria-live','off');
          }, 2000);
        }else{
          // $agree.addClass('weui-agree_animate');
          $agree.addClass('weui-agree_warn');
          $agreeMsg.show();
          setTimeout(function () {
            // $agree.removeClass('weui-agree_animate');
            $agreeMsg.hide();
          }, 200);
        }
      });


      $('#dialogs').on('click', '.weui-mask', function(){
        $halfScreenDialog.removeClass('weui-half-screen-dialog_show');
        $(this).parents('.js_dialog').fadeOut(200);
        $iosDialog1.attr('aria-modal','false');
          $('#showIOSDialog1').attr('tabindex','-1').trigger('focus');
      });
      $('#dialogClose').on('click', function(){
        $halfScreenDialog.removeClass('weui-half-screen-dialog_show');
        $(this).parents('.js_dialog').fadeOut(200);
        $iosDialog1.attr('aria-modal','false');
          $('#showIOSDialog1').attr('tabindex','-1').trigger('focus');
      });

      $('#showIOSDialog1').on('click', function(){
        $iosDialog1.fadeIn(200);
        $halfScreenDialog.addClass('weui-half-screen-dialog_show');
        $iosDialog1.attr('aria-modal','true');
        setTimeout(function () {
          $('#dialogClose').trigger('focus');
        }, 500);
      });

      $('.weui-cell').on('click', function(e){
        if(e.target.classList.contains('js_target')){
          return;
        }
        $(this).find('input').trigger('focus');
      });
      $inputClear.on('click', function(){
        $input.val('');
      });

    });</script>




        <script src="js/zepto.min.js"></script>
        <script type="text/javascript" src="js/jweixin-1.0.0.js"></script>
        <script src="js/weui.min.js"></script>
        <script src="js/example.js"></script>
        <script src="js/wah.js"></script>
        <script type="text/javascript"></script>
        <script type="text/javascript">function wxReady(e){"object"==typeof WeixinJSBridge&&"function"==typeof window.WeixinJSBridge.invoke?e():document.addEventListener("WeixinJSBridgeReady",e,!1)}wxReady(function(){WeixinJSBridge.invoke("getUserConfig",{},function(e){e.isCareMode&&document.body.setAttribute("data-weui-mode","care")})})</script>
    </body>
</html>